have /sbin/udev anymore).
Signed-off-by: Murillo F. Bernardes <mfb@br.ibm.com>
cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
echo "All done."
-if [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
+[ -x "$(which udevinfo)" ] && \
+ UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
+
+if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
else
cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
echo ' *** Check for the hotplug scripts (hotplug) FAILED'
exit 1
}
+[ -x "$(which udevinfo)" ] && \
+ UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
-if [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
+if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
exit 0
fi